<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <link type="text/css" rel="stylesheet" href="../inc/bootstrap.css" />
<title>Create</title>
</head>
<body>
<?php
	require_once('../inc/users.php');
	require_once('../inc/functions.php');
	
	$firstName = $_GET['firstname'];
	$secondName = $_GET['secondname'];
	$type = $_GET['type'];
		
	if(addUser($firstName, $secondName, $type))
	{
		echo '<p>User ';  
		echo "$firstName $secondName has been added Successfully!<br />You will be redirected to the previous page.</p>";
		header('Refresh: 4; url=index.php');
	}
	else
	{
		echo "An error has occured!<br />You will be redirected to the previous page.";
		header('Refresh: 4; url=index.php');
	}
	
?>
</body>
</html>